<?php

namespace admin\models;

use Yii;

class UserGive extends \common\models\UserGive
{
    public function rules()
    {
        return array_merge(parent::rules(), [
            // [['field1', 'field2'], 'required', 'message' => '{attribute} is required'],
        ]);
    }

    public function scenarios()
    {
        return array_merge(parent::scenarios(), [
            // 'scenario' => ['field1', 'field2'],
        ]);
    }

    public function attributeLabels()
    {
        return array_merge(parent::attributeLabels(), [
            // 'field1' => 'description1',
            // 'field2' => 'description2',
        ]);
    }

    public function giveListQuery()
    {
        return $this->search()
            ->joinWith(['user.adminUser']);
            // ->andFilterWhere(['>', 'user.created_at', $this->created_at]);
    }
}
